<template>
  <div>
     <el-table
      :data="aTableData"
      border
      height="140"
      style="width: 100%">
      <el-table-column
        prop="code"
        label="物料代码"
        width="150"
        header-align="center">
      </el-table-column>
      <el-table-column
        prop="name"
        label="物料名称"
        header-align="center"
        width="350">
      </el-table-column>
      <el-table-column
        prop="specification"
        label="规格"
        header-align="center">
      </el-table-column>
      <el-table-column
        prop="amount"
        label="BOM 成本"
        header-align="center"
        width="120"
        v-if = "sUser === 'admin'">
        <template slot-scope="scope">{{ scope.row.amount }}</template>
      </el-table-column>
    </el-table>
  </div>
</template>

<script>
import { mapGetters } from 'vuex';
import myServer from '@/api/index.js';
  export default {
    name: "bomTreeDetail"
    ,props:{
        aTableData:{
            type:Array
            ,default(){
                return [];
            }
        }
    }
    ,data(){
      return{}
    }
    ,computed:{
      ...mapGetters({
        sUser:'sUser'
      })
    }
    ,created(){
        let t = this;
       
    }
    ,methods:{
        
    }
  }
</script>

<style scoped>

</style>
